package com.tp.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.tp.common.po.User;
import com.tp.web.Service.UserService;

@Controller
@RequestMapping("user")
public class UserController {
	@Autowired
	private UserService userService;
	
	@RequestMapping("friend")
	public String UserIndex(){
		return "user/friend";
	}
	@RequestMapping("acccount_detail")
	@ResponseBody
	public String AcccountDetail(Long id){
		id=1l;
		User user = userService.findUserById(id);
		ThreadLocal<User> threadLocal = new ThreadLocal<>();
		threadLocal.set(user);
		return "user/acccount_detail";
	}
	@RequestMapping("friend_search")
	public String FriendSearch(){
		return "user/friend_search";
	}
}
